package com.shasselclub.api.v1.service;


import com.shasselclub.common.constant.ResultModel;
import org.springframework.validation.BindingResult;

import javax.servlet.http.HttpServletRequest;


/**
 * @program: springclould_ylcaifu_App
 * @description:
 * @author: zhengyunfei
 * @create: 2019-01-21 13:13
 **/

public interface ValidParamService {
    /**
     * 校验参数
     * @param bindingResult
     * @param resultModel
     * @return
     */
    boolean validParam(BindingResult bindingResult, ResultModel resultModel);

    /**
     * 校验活动id是否正确
     * @param questionId
     * @param resultModel
     * @return
     */
    boolean validParamForQuestionId(String  questionId, ResultModel resultModel);

    /**
     * 校验openid是否正确
     * @param questionId
     * @param resultModel
     * @return
     */
    boolean validParamForOpenId(String  questionId, ResultModel resultModel);
    /**
     * 通过请求头判断是否是微信内置浏览器，是否是在微信内打开
     * @param request
     * @return
     */
    boolean validParamForOpenId(HttpServletRequest request, ResultModel resultModel);


    }
